var channelTypes = new Array();
channelTypes[0]="国际快递";
channelTypes[1]="国际邮递";
channelTypes[2]="国际专线";
channelTypes[3]="其它";

var suppliersTypes = new Array();
suppliersTypes[0] = "快递公司";
suppliersTypes[1] = "邮政公司";
suppliersTypes[2] = "代理公司";
suppliersTypes[3] = "空运公司";
suppliersTypes[4] = "清关公司";
suppliersTypes[5] = "其他";

function getChannelType(ctypeId){
	return channelTypes[ctypeId];
}

function getSupplierType(stypeId){
	return suppliersTypes[stypeId];
}

function closeshowAll(){
	closeshowByType();
	closeshowTrackByBoole();
	closeshowImitheavyByBoole();
	closeshowVolumeByBoole();
	closeshowFuelsurByBoole();
}

function closeshowByType(){
   if($("#entity_type").val() == '0' || $("#entity_type").val() == '1'){
		$("#entity_otherType").attr("disabled",true);
		$("#entity_otherType").val('');
		$("#entity_airFreightcompany").attr("disabled",true);
		$("#entity_airFreightcompany").val('');
		$("#entity_clearanceCompany").attr("disabled",true);
		$("#entity_clearanceCompany").val('');
		$("#entity_purposeSendcountries").attr("disabled",true);
		$("#entity_purposeSendcountries").val('');
	}
	if($("#entity_type").val() == '2'){
		$("#entity_otherType").attr("disabled",true);
		$("#entity_otherType").val('');
		$("#entity_airFreightcompany").attr("disabled",false);
		$("#entity_clearanceCompany").attr("disabled",false);
		$("#entity_purposeSendcountries").attr("disabled",false);
	}
	if($("#entity_type").val() == '3'){
		$("#entity_otherType").attr("disabled",false);
		$("#entity_airFreightcompany").attr("disabled",false);
		$("#entity_clearanceCompany").attr("disabled",false);
		$("#entity_purposeSendcountries").attr("disabled",false);
	}
}

function closeshowTrackByBoole(){
	if($('#entity_whetherTrack').val() == '1'){
		$("#entity_netTime").attr("disabled",false);
	}
	if($('#entity_whetherTrack').val() == '0'){
		$("#entity_netTime").attr("disabled",true);
		$("#entity_netTime").val('');
	}
}

function closeshowImitheavyByBoole(){
	if($('#entity_whetherImitheavy').val() == '1'){
		$("#entity_weightRange").attr("disabled",false);
	}
	if($('#entity_whetherImitheavy').val() == '0'){
		$("#entity_weightRange").attr("disabled",true);
		$("#entity_weightRange").val('');
	}
}

function closeshowVolumeByBoole(){
	if($('#entity_accordingVolumeCharge').val() == '1'){
		$("#entity_volumeFormula").attr("disabled",false);
	}
	if($('#entity_accordingVolumeCharge').val() == '0'){
		$("#entity_volumeFormula").attr("disabled",true);
		$("#entity_volumeFormula").val('');
	}
}

function closeshowFuelsurByBoole(){
	if($('#entity_fuelsurCharge').val() == '1'){
		$("#entity_additionalRates").attr("disabled",false);
	}
	if($('#entity_fuelsurCharge').val() == '0'){
		$("#entity_additionalRates").attr("disabled",true);
		$("#entity_additionalRates").val('');
	}
}

